import { ElMessage } from 'element-plus';
// import { useI18n } from 'vue-i18n';
import { i18n } from '/@/i18n/index';
export default function () {
	// const { t } = useI18n();
	const info = (key: any) => {
		ElMessage(i18n.global.t(key));
	};
	const success = (key: any) => {
		ElMessage.success(i18n.global.t(key));
	};
	const error = (key: any) => {
		ElMessage.error(i18n.global.t(key));
	};
	const warn = (key: any) => {
		ElMessage.warning(i18n.global.t(key));
	};

	return {
		info,
		success,
		error,
		warn,
	};
}
